﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class test1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        float s = 1;
        for (float i = 0; i < 100; i++)
        {
            s = s + i/(i+1);
        }
        Response.Write("for循环的结果为："+s+"<br>");

        float a = 1,c=0;
        while(c<100)
        {
            a = a + c / (c + 1);
            c++;
        }
        Response.Write("while循环的结果为：" + a + "<br>");

        float b = 1, d = 0;
        do
        {
            b = b + d / (d + 1);
            d++;
        } while (d< 100);
        Response.Write("do...while循环的结果为：" + b + "<br>");


    }
}